<?php
//error_reporting(E_NONE);
session_start();
// MySQL Settings
$dbhost = 'localhost'; // Hostname, mostly localhost
$dbuser = 'root'; // Database username
$dbpass = ''; // Database password
$dbname = 'bsocial'; // Database name
$con = mysql_connect($dbhost, $dbuser, $dbpass) or die ('B-Social is having some technical problems atm. Our technical team is doing there utmost best
to fix this asap.'); // You can change this message to what ever you want.
mysql_select_db($dbname);
?>

<?php
// Page settings
// Example; <a href="index.php?p=login">Login!</a>
switch($_GET['p']){
	case 'login': $content = 'contents/login.php'; break;
	case 'register': $content = 'contents/register.php'; break;
	case 'home': $content = 'contents/home.php'; break;
	case 'search': $content = 'contents/search.php'; break;
	case 'check': $content = 'contents/check.php'; break;
	case 'logout': $content = 'contents/logout.php'; break;
	case 'profile': $content = 'contents/profile.php'; break;
	// The default page that shows when you open up the website
	default: $content = 'contents/home.php'; break;
}
// Some other shit.
switch($_GET['l']){
	case 'pinfo': $lcontent = 'contents/profileinfo.php'; break;
	default: $lcontent = 'contents/myprofile.php'; break;
}
?>